home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _9A8B65EA32034C62993628824514CF78 < prev    next >
Encoding:
Text File  |  2004-01-06  |  3.4 KB  |  99 lines

  1. --------------------------------------------------
  2. --    Created By: Petar
  3. --   Description: This is the first guy in the prototype 3 map
  4. --------------------------
  5. --
  6.  
  7. AIBehaviour.P31Idle = {
  8.     Name = "P31Idle",
  9.     pathname = "",
  10.  
  11.     -- SYSTEM EVENTS            -----
  12.     ---------------------------------------------
  13.     OnSelected = function( self, entity )    
  14.     end,
  15.     ---------------------------------------------
  16.     OnSpawn = function( self, entity )
  17.         -- called when enemy spawned or reset
  18.         AI:CreateGoalPipe("recognition");
  19.         AI:PushGoal("recognition","timeout",1,0.2);
  20.         AI:PushGoal("recognition","signal",0,1,"PlayRecognitionAnimAndSound",0);
  21.         AI:PushGoal("recognition","timeout",1,2);
  22.         AI:PushGoal("recognition","signal",0,1,"StartFollowing",0);
  23.  
  24.  
  25.         AI:CreateGoalPipe("following");
  26.         AI:PushGoal("following","approach",1,5);
  27.         AI:PushGoal("following","timeout",1,1);
  28.  
  29.         AI:CreateGoalPipe("wonderwhere");
  30.         AI:PushGoal("wonderwhere","signal",0,1,"IllustrateWonder",0);
  31.         AI:PushGoal("wonderwhere","timeout",1,1);
  32.         AI:PushGoal("wonderwhere","lookaround",1,2);
  33.         AI:PushGoal("wonderwhere","timeout",1,2);
  34.         AI:PushGoal("wonderwhere","approach",1,0.1);
  35.  
  36.  
  37.         AI:CreateGoalPipe("defensive");
  38.         AI:PushGoal("defensive","timeout",1,0.5);
  39.         AI:PushGoal("defensive","signal",0,1,"PlayDefensive",0);
  40.         AI:PushGoal("defensive","timeout",1,2);
  41.         AI:PushGoal("defensive","signal",0,1,"StopFollowing",0);
  42.  
  43.         AI:CreateGoalPipe("the_test");
  44.         AI:PushGoal("the_test","lookaround",1,3);
  45.         AI:PushGoal("the_test","timeout",1,5);
  46.  
  47.         entity:SelectPipe(0,"the_test");
  48.     end,
  49.     ---------------------------------------------
  50.     OnActivate = function( self, entity )
  51.         -- called when enemy receives an activate event (from a trigger, for example)
  52.     end,
  53.     ---------------------------------------------
  54.     OnNoTarget = function( self, entity )
  55.         -- called when the enemy stops having an attention target
  56.     end,
  57.     ---------------------------------------------
  58.     OnPlayerSeen = function( self, entity, fDistance )
  59.         -- called when the enemy sees a living player
  60.         entity:SelectPipe(0,"recognition");
  61.     end,
  62.     ---------------------------------------------
  63.     OnEnemySeen = function( self, entity )
  64.         -- called when the enemy sees a foe which is not a living player
  65.     end,
  66.     ---------------------------------------------
  67.     OnEnemyMemory = function( self, entity )
  68.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  69.     end,
  70.     ---------------------------------------------
  71.     OnInterestingSoundHeard = function( self, entity )
  72.         -- called when the enemy hears an interesting sound
  73.     end,
  74.     ---------------------------------------------
  75.     OnThreateningSoundHeard = function( self, entity )
  76.         -- called when the enemy hears a scary sound
  77.     end,
  78.     ---------------------------------------------
  79.     OnReload = function( self, entity )
  80.         -- called when the enemy goes into automatic reload after its clip is empty
  81.     end,
  82.     ---------------------------------------------
  83.     OnGroupMemberDied = function( self, entity )
  84.         -- called when a member of the group dies
  85.     end,
  86.     ---------------------------------------------
  87.     OnNoHidingPlace = function( self, entity, sender )
  88.         -- called when no hiding place can be found with the specified parameters
  89.     end,    
  90.     ---------------------------------------------
  91.     OnReceivingDamage = function ( self, entity, sender)
  92.         -- called when the enemy is damaged
  93.     end,
  94.  
  95.  
  96.  
  97.  
  98.  
  99. }